﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="admin_Default" Title="大众防骗" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <div class="w-sjzzbb">
        <div class="w-sjzztop">
            综合数据管理
        </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <div style="border:1px solid #09f;text-align:left"><p style="font-size:17px;text-align:center">综合举报与查询信息管理中心</p>
            请选择信息类型：
            <asp:DropDownList ID="DropDownList_type" runat="server" AppendDataBoundItems="True"
                AutoPostBack="True" DataSourceID="ObjectDataSource_type" DataTextField="type"
                DataValueField="id">
                <asp:ListItem Selected="True" Value="0">==全部==</asp:ListItem>
            </asp:DropDownList>
            </div>
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" CellPadding="4" DataKeyNames="id" DataSourceID="ObjectDataSource_info"
                ForeColor="#333333" GridLines="None" PageSize="25" Width="100%">
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#c7e9ff" ForeColor="#333333" Height="40"/>
                <Columns>
                    <asp:BoundField DataField="typename" HeaderText="分类" SortExpression="type">
                        <ItemStyle Width="60px"/>
                    </asp:BoundField>
                    <asp:BoundField DataField="object" HeaderText="信息内容" SortExpression="object" />
                    <asp:BoundField DataField="info" HeaderText="info" SortExpression="info" Visible="False" />
                    <asp:BoundField DataField="S_times" HeaderText="检索次数" SortExpression="S_times">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="F_S_time" DataFormatString="{0:d}" HeaderText="首次检索时间"
                        SortExpression="F_S_time">
                        <ItemStyle HorizontalAlign="Center" Width="115px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="L_S_time" DataFormatString="{0:d}" HeaderText="最后检索时间"
                        SortExpression="L_S_time">
                        <ItemStyle HorizontalAlign="Center" Width="115px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="R_times" HeaderText="举报次数" SortExpression="R_times">
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="F_R_time" DataFormatString="{0:d}" HeaderText="首次举报时间"
                        SortExpression="F_R_time">
                        <ItemStyle HorizontalAlign="Center" Width="115px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="L_R_time" DataFormatString="{0:d}" HeaderText="最后举报时间"
                        SortExpression="L_R_time">
                        <ItemStyle HorizontalAlign="Center" Width="115px" />
                    </asp:BoundField>
                    <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" Visible="False" />
                    <asp:CheckBoxField DataField="Delete_flag" HeaderText="禁用" SortExpression="Delete_flag">
                        <ItemStyle HorizontalAlign="Center" Width="35px" />
                    </asp:CheckBoxField>
                    <asp:TemplateField ShowHeader="False">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="false" CommandName="Update"
                                Text='<%# Convert.ToBoolean(Eval("Delete_flag")) ==false?"启用":"<font color=red>禁用</font>" %>'
                                ToolTip="单击“启用/禁用”本条记录！"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" Width="40px" />
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                                Text="更新"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <%--<asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                   CommandName="Edit" ForeColor="#660033" Text="编辑"></asp:LinkButton>
                               &nbsp;--%><asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False"
                                   CommandName="Delete" ForeColor="#660033" OnClientClick="javascript:return confirm('您确定要删除该记录吗? 您将无法恢复！');"
                                   Text="删除"></asp:LinkButton>
                        </ItemTemplate>
                        <ItemStyle ForeColor="#660033" HorizontalAlign="Right" Width="40px" />
                    </asp:TemplateField>
                </Columns>
                <PagerStyle BackColor="#0099FF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#0099ff" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle"/>
                <EditRowStyle BackColor="#999999" />
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:ObjectDataSource ID="ObjectDataSource_type" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Data_OrderBy_id" TypeName="DataSet_fp_DyhTableAdapters.Dyh_typeTableAdapter">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource_info" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert_New_Data_Query" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Union_Data_By_Type_For_Admin" TypeName="DataSet_fp_DyhTableAdapters.Dyh_baseDBTableAdapter"
        UpdateMethod="Update_Delete_Flag_Query_By_Id">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Original_id" Type="Int32" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList_type" DefaultValue="0" Name="type"
                PropertyName="SelectedValue" Type="Byte" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="_object" Type="String" />
            <asp:Parameter Name="type" Type="Byte" />
            <asp:Parameter Name="S_times" Type="Int32" />
            <asp:Parameter Name="R_times" Type="Int32" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>
